<template>
	<view class="usermenu">
		<view class="menulist" v-for="(item,index) in menuList" :key="index" @click="toPage(item)">
			{{item.text}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				menuList: [{
						id: 1,
						text: this.$t('index.hyzq'),
						url: '/pages/user/index'
					},
					{
						id: 2,
						text: this.$t('index.ddcx'),
						url: '/pages/user/orderlist'
					},
					{
						id: 3,
						text: this.$t('index.kfly'),
						url: '/pages/user/questionInsert'
					},
					{
						id: 15,
						text: this.$t('index.tjt'),
						url: '/pages/user/tree'
					},
					{
						id: 14,
						text: this.$t('index.azt'),
						url: '/pages/user/recommend'
					},
					{
						id: 4,
						text: this.$t('index.wdsc'),
						url: '/pages/user/salelist'
					},
					{
						id: 5,
						text: this.$t('index.cysjr'),
						url: '/pages/user/addresslist'
					},
					{
						id: 6,
						text: this.$t('index.xgdlmm'),
						url: '/pages/user/setpassword'
					},
					{
						id: 7,
						text: this.$t('index.xgzfmm'),
						url: '/pages/user/setpayword'
					},
					{
						id: 7,
						text: this.$t('index.ppgs'),
						url: '/pages/user/about?type=brand'
					},
					{
						id: 8,
						text: this.$t('index.sdjj'),
						url: '/pages/user/about?type=intro'
					},
					{
						id: 9,
						text: this.$t('index.ysq'),
						url: '/pages/user/about?type=agree'
					},
					{
						id: 10,
						text: this.$t('index.gwsm'),
						url: '/pages/user/about?type=shop'
					},
					{
						id: 11,
						text: this.$t('index.hyqy'),
						url: '/pages/user/about?type=interests'
					},
				]
			}
		},
		onLoad() {

		},
		methods: {
			toPage(item) {
				uni.navigateTo({
					url: item.url
				})
			}
		}
	}
</script>

<style lang="scss">
	.menulist {
		width: 100%;
		padding-bottom: 12px;
		box-sizing: border-box;
		font-size: 14px;
		cursor: pointer;
	}

	@media (max-width:768px) {
		.menulist {
			border-bottom: 1px solid #eee;
			padding: 10px;
			background: #fff;
			box-sizing: border-box;
		}

		.usermenu {
			width: 98%;
			margin: 0 auto;
			box-shadow: 0 0 15px #eee;
		}
	}
</style>